﻿@{ Layout = "~/Views/Shared/_LayoutAngular.cshtml"; ViewBag.Title = "Login";}
@section header {
    <script type="text/javascript" src="/Scripts/App/loginApp.js"></script>}        
        <h2>Login</h2>
        <div ng-controller="Ctrl"> 
            <form name="myForm">
                User name: <input type="text" name="userName" ng-model="user.name" required><span class="error" ng-show="myForm.userName.$error.required">Required!</span><br>
                Last name: <input type="text" name="lastName" ng-model="user.last" ng-minlength="3" ng-maxlength="10"><span class="error" ng-show="myForm.lastName.$error.minlength">Too short!</span><span class="error" ng-show="myForm.lastName.$error.maxlength">Too long!</span><br>
                <input type="submit" ng-click="connect()" value="Connect"/>
            </form>
        </div>